GDK W32: Fix pointer-under-window code for custom resize
authorРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 12 Mar 2016 12:55:24 +0000 (12:55 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Mon, 14 Mar 2016 15:06:51 +0000 (15:06 +0000)
commitab16b19a0a9c026b1e0997f8dee01120585369c9
tree48f2279554366194d10d841c6c2bc14735c94e2d
parentade1ac16a8c617efb4ee31774f920daa63055d6c
GDK W32: Fix pointer-under-window code for custom resize

This code:
>  gdk_window_get_root_origin (window, &x, &y);
>  x -= root_x;
>  y -= root_y;
>  pointer_window = gdk_device_get_window_at_position (device, &x, &y);
was meant to find the child gdk window at coordinates root_x and root_y.

These 4 lines had 2 bugs:
1) x = x - root_x (same for y) is wrong, it should be x = root_x - x
2) gdk_device_get_window_at_position() does not give you the window
   at position x and y. It gives you the window under the device
   (mouse pointer) and the returns the device coordinates in x and y.

https://bugzilla.gnome.org/show_bug.cgi?id=763533
gdk/win32/gdkwindow-win32.c